package com.softaria.windows.model;

/**
 * Simplest implementation of {@link SizeCalculator} It does not really
 * calculates size, but uses its fixed value
 * 
 * @author Roman M Kuzmin (roman@softaria.com)
 * 
 */
public class AbsoluteSizeCalculator implements SizeCalculator {

  private int h;
  private int w;

  public AbsoluteSizeCalculator(int h, int w) {
    super();
    this.h = h;
    this.w = w;

  }

  public Size calculateSize(int width, int height) {

    return new Size() {

      @Override
      public int getHeight() {
        return h;
      }

      @Override
      public int getWidth() {
        return w;
      }

    };
  }

}
